<script setup lang="ts">
import {MdEditor, MdPreview, MdCatalog} from 'md-editor-v3';
import 'md-editor-v3/lib/style.css';
import UiCard from "@/components/common/UiCard.vue";

const id = ref("editor");
const scrollElement = document.documentElement;
const markdown = '1232313123123123123123123123123123123123123123123123'

const pre_fix = `\`\`\`json  \n`
const append_fix = `\n\`\`\``


interface Props {
  text: string
}

const props = withDefaults(defineProps<Props>(), {
  text: ""
})
watch(props, (val) => {
  console.log(val);
});


</script>

<template>
  <MdPreview :modelValue="pre_fix+text+append_fix" :theme="useCustomizeThemeStore().darkTheme? 'dark' : 'light'"/>
</template>

<style scoped lang="scss"></style>
